feat(phase3-step10): Proactive Messaging + Auto-Escalation (backend)#22
Merged
feat(phase3-step10): Proactive Messaging + Auto-Escalation (backend)#22
Conversation
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 3 Step 10 — Proactive Messaging + Auto-Escalation. Backend complete. PWA HTML for Project-mode dropdown + status pills deferred to Phase 3.5 alongside the proactive intelligence overlay.
codec_agent_messaging.pyships agent → user message dispatch with 60s batching window._run_agent(Step 9) getspost_messagecalls at 5 lifecycle points (started, checkpoint completed, blocked, aborted, done). Chat handler runs Qwen-3.6 classifier with 2-signal gate; on user "No", silences for that conversation (Q11).Reference
docs/PHASE3-BLUEPRINT.md§4docs/PHASE3-STEP10-PLAN.mdFiles
codec_agent_messaging.pytests/test_agent_messaging.pytests/test_chat_escalation.pycodec_audit.pyPHASE3_STEP10_EVENTSfrozensetcodec_agent_runner.pyroutes/agents.pyGET /messages,POST /messages,POST /silencecodec_dashboard.pyAGENTS.mdAudit envelope
3 new schema:1 events.
agent_message_sentand_receivedthread the per-agent correlation_id from_run_agent's envelope.agent_auto_escalated_from_chatis independent (chat-handler invocation, no agent yet).Permission/safety reuses
~/.codec/notifications.jsoninfrastructure since Phase 1What's deferred to Phase 3.5
codec_dashboard.htmlmode-dropdown + status pills polling /api/agents (backend supports it viaPOST /api/agents; UI is end-user polish)blocked_on_qwenstatusTest plan
tests/test_agent_messaging.py→ 16 passedtests/test_chat_escalation.py→ 8 passedPOST /api/agents, approve, watch agent run + post update messages to chat threadOne subagent-flagged improvement
fix(agent_messaging): pass correct batched flag to audit emit— the original code hardcodedbatched=Falsein the_auditcall regardless of whether the message actually got batched into an existing banner. Now passes the correct flag.Phase 3 closeout (next PR)
After this merges:
docs/PHASE3-COMPLETE.mdwill consolidate all Step 8/9/10 sign-offs (matching Phase 1+2 closeout pattern). Phase 3.5 starts after.🤖 Generated with Claude Code